package com.example.luozizhao.eprxdemo.http.api;

import com.example.luozizhao.eprxdemo.net.bean.face.TokenRespon;
import com.example.luozizhao.eprxdemo.net.response.GetNounceRespBean;
import com.example.luozizhao.eprxdemo.net.response.login.UserLoginRespBean;


import java.security.Key;
import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by luozizhao on 2018/4/23.
 */

public interface ApiService {

    @GET("index/get_nounce/")
    Observable<GetNounceRespBean> getTattedCode();

    @FormUrlEncoded
    @POST("index/app_login/")
    Observable<UserLoginRespBean> login(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("/")
    Observable<TokenRespon> getToken(@Field("grant_type") String type
            , @Field("client_id") String api_key
            , @Field("client_secret") String secret_Key);


}
